package com.gopay.common.cps.manager.order.impl;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.gopay.common.cps.dao.order.CpsGeneralMainOrderQueryDAO;
import com.gopay.common.cps.dao.order.CpsGeneralPayOrderQueryDAO;
import com.gopay.common.cps.manager.order.FullCpsGenPayOrderQueryManager;
import com.gopay.common.domain.cps.CpsGenMainOrder;
import com.gopay.common.domain.cps.CpsGenPayOrder;
import com.gopay.common.domain.cps.vo.FullCpsGenPayOrder;

@Service(value = "fullCpsGenPayOrderQueryManager")
public class FullCpsGenPayOrderQueryManagerImpl implements FullCpsGenPayOrderQueryManager {
    @Resource(name = "cpsGeneralMainOrderQueryDAO")
    private CpsGeneralMainOrderQueryDAO cpsGeneralMainOrderQueryDAO;

    @Resource(name = "cpsGenPayOrderQueryDAO")
    private CpsGeneralPayOrderQueryDAO cpsGenPayOrderQueryDAO;
    
    @Override
    public FullCpsGenPayOrder get(Serializable id) {
        CpsGenMainOrder main = cpsGeneralMainOrderQueryDAO.find(CpsGenMainOrder.class, id);
        if (main != null) {
            CpsGenPayOrder recv = cpsGenPayOrderQueryDAO.find(CpsGenPayOrder.class, id);

            if (recv != null) {
                return new FullCpsGenPayOrder(main, recv);
            }
        }
        return null;
    }

    @Override
    public List<FullCpsGenPayOrder> get(Map<Object, Object> paraMap) {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public List<FullCpsGenPayOrder> getAll() {
        // TODO Auto-generated method stub
        return null;
    }


}
